package com.zyh.digui;

public class Demo1 {
    //10*9*8...*1
    public static void main(String[] args) {
        int sum = sum(10);
        System.out.println("sum = " + sum);
    }
    public static int sum(int n){
        if (n==1){
            return 1;
        }

        return n*sum(n-1);
    }
}
